import { Application, BackendSession } from "pinus";
import { PetBuyFlute_req, PetBuyFlute_revc } from '../../../package/protocol/ProtoDef';

export default function (app: Application) {
    return new Handler(app);
}

export class Handler {
    constructor(private app: Application) {

    }

    public async doBuyFlute(msg: PetBuyFlute_req, session: BackendSession) {
        let rid = session.get('rid');
        let uid = session.uid;
        console.log(session.get('playerObj'));
        let channelService = this.app.get('channelService');
        let channel = channelService.getChannel(rid, false);
        const param = new PetBuyFlute_revc();
        channel.pushMessage('', param);
    }
}